<?php $this->load->view('common/admin_header');?>
<div class="block no_line">
  <div class="block_head">
    <div class="bheadl"></div>
    <div class="bheadr"></div>
    <h2><?=$lang['orders_lable_55']?></h2>
      <ul>
        <li><a href="<?=site_url('admins/integral').'?'.base64_decode($this->input->cookie('url_query'))?>"><?=$lang['orders_lable_48']?></a></li>
      </ul>
  </div>
  <div class="statistics">
      <table class="statistics_t" width="100%" cellspacing="0" cellpadding="0">
        <tbody>
          <tr>
            <td>
              <strong><?=isset($list_one['phone'])?$list_one['phone']:0?></strong> <?=$lang['orders_lable_56']?>
            </td>
            <td style="border-right:none;"><strong> <?=isset($list_one['integral'])?$list_one['integral']:0?> </strong> <?=$lang['orders_lable_57']?> </td>
          </tr>
        </tbody>
      </table>
  </div>
</div>
<div class="block">
  <div class="block_head">
    <div class="bheadl"></div>
    <div class="bheadr"></div>
    <h2><?=$lang['orders_lable_58']?></h2>
    <ul>
      <li><a href="<?=site_url('admins/integral').'?'.base64_decode($this->input->cookie('url_query'))?>"><?=$lang['orders_lable_48']?></a></li>
    </ul>
  </div>
  <!-- .block_head ends -->
  <div class="block_content">
    <?php $this->load->view('common/notify');?>
    <form action="<?=site_url('admins/integral/view/'.$list_one['id'])?>" method="get">
      <input type="hidden" name="field" value="<?=isset($field)?$field:'add_time'?>" id="field">
      <input type="hidden" name="sort" value="<?=isset($sort)?$sort:'desc'?>" id="sort">
      <table cellpadding="0" cellspacing="0" width="100%" class="sortable">
        <thead>
          <tr>
            <th><a id="admin_name" class="<?=isset($field) && $field=='admin_name'?$sort:'';?>" href="#"><?=$lang['admin_lable_14']?></a></th>
            <th><a id="notify" class="<?=isset($field) && $field=='notify'?$sort:'';?>" href="#"><?=$lang['orders_lable_59']?></a></th>
            <th><a id="score" class="<?=isset($field) && $field=='score'?$sort:'';?>" href="#"><?=$lang['orders_lable_61']?></a></th>
            <th><a id="add_time" class="<?=isset($field) && $field=='add_time'?$sort:'';?>" href="#"><?=$lang['orders_lable_62']?></a></th>
            <th><a id="send_result" class="<?=isset($field) && $field=='send_result'?$sort:'';?>" href="#"><?=$lang['orders_lable_47']?></a></th>
            <th style="text-align:center"><?=$lang['global_lable_32']?></th>
          </tr>
          <tr>
            <td><input type="text" class="stext" name="admin_name" lang="zh-TW" x-webkit-speech x-webkit-grammar="bUIltin:search" value="<?=isset($admin_name)?$admin_name:''?>"></td>
            <td>
              <select name="notify">
                <option value=""><?=$lang['orders_lable_60']?></option>
                <option value="1" <?=isset($notify) && $notify=='1'?'selected':''?> ><?=$lang['orders_lable_76']?></option>
                <option value="2" <?=isset($notify) && $notify=='2'?'selected':''?> ><?=$lang['orders_lable_77']?></option>
              </select>
            </td>
            <td>&nbsp;</td>
            <td colspan="2">
              <input id="d4311" class="stext" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'d4312\')}',dateFmt:'yyyy-MM-dd HH:ss:mm',lang:'zh-tw'})" name="begin_month" value='<?=set_value('begin_month',isset($begin_month)?$begin_month:'')?>'/>
                <?=$lang['global_lable_46']?>
              <input id="d4312" class="stext" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'d4311\')}',dateFmt:'yyyy-MM-dd HH:ss:mm',lang:'zh-tw'})" name="end_month" value='<?=set_value('end_month',isset($end_month)?$end_month:'')?>'/>
            </td>
            <td style="text-align:center">
              <input type="submit" class="btn btn-small btn-primary" name="sub_filter" value="<?=$lang['global_lable_31']?>"/>
              <a href="<?=site_url('admins/integral/add/'.$list_one['id'])?>" class="btn btn-small btn-danger"><i class="icon-plus"></i> <?=$lang['global_lable_23']?></a>
            </td>
          </tr>
        </thead>
        <tbody class="table">
          <?php if(isset($lists_count) && $lists_count>0):?>
          <?php foreach($lists->result_array() as $list):
            $urls=site_url('admins/integral/%s/'.$list['id']).'?integral_id='.$list['integral_id'];
            $notify=$list['notify']==1?$lang['orders_lable_76']:$lang['orders_lable_76'];
          ?>
          <tr>
            <td><?=$list['admin_name']?></td>
            <td><?=$notify?></td>
            <?php if($list['notify']==1):?>
            <td style="color:green">+<?=$list['score']?></td>
            <?php elseif($list['notify']==2):?>
            <td style="color:red">-<?=$list['score']?></td>
            <?php endif;?>
            <td><?=date($format_time,$list['add_time'])?></td>
            <td><?=$list['comment']?></td>
            <td class="listaction">
              <?php if($this->nsession->userdata('nick_name')=='clickr'):?>
              <a href="javascript:void(0);" onClick="delete_item('<?=sprintf($urls,"delete_history")?>');" class="l_delete"><?=$lang['global_lable_25']?></a>
              <?php endif;?>
            </td>
          </tr>
          <?php endforeach;?>
          <?php else:?>
          <tr>
            <td colspan="9" class="nodata"><p><?=$lang['global_lable_42']?></p></td>
          </tr>
          <?php endif;?>
        </tbody>
      </table>
      <!-- .tableactions ends -->
      <div id="pagination"><?php echo $pagination;?><div class="listscount"><?=$lang['global_lable_29']?> <?=$lists_count?> <?=$lang['global_lable_30']?></div></div>
      <!-- .pagination ends -->
    </form>
  </div>
  <!-- .block_content ends -->
  <div class="bendl"></div>
  <div class="bendr"></div>
</div>
<!-- .block ends -->
<?php $this->load->view('common/admin_footer');?>